/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test.cei.rmi.observer.cliente;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import test.cei.rmi.observer.common.rmi.ClienteRMI;
import test.cei.rmi.observer.common.Observadora;
import test.cei.rmi.observer.common.dto.MensajeDTO;

/**
 *
 * @author Francisco
 */
public class Cliente extends UnicastRemoteObject implements Observadora, ClienteRMI {

    private String name;

    public Cliente(String name) throws RemoteException {
        super();
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void comunicar() throws RemoteException {
    }

    @Override
    public void recibirMensaje(MensajeDTO mensaje) {
        System.out.println(mensaje);
    }
}
